/**
 * 
 */
package com.zte.claa.inficombo.csa.app.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author 0283000115
 * 
	csa.3rd.subparser.raw.comm.bufsize=1024
	csa.3rd.subparser.raw.comm.cmdsendtimeoutsecond=5
	csa.3rd.subparser.raw.comm.cmdtimeoutsecond=7
	csa.3rd.subparser.raw.comm.connwaitsecond=6
	csa.3rd.subparser.raw.comm.sessionidlesecond=180
	csa.3rd.subparser.raw.comm.charsetname=UTF-8
	csa.3rd.subparser.raw.comm.dealnum=3
 *
 */

@Component  
@ConfigurationProperties(prefix="csa.3rd.subparser.raw.comm") 
public class RawTransferCommProps {
	private int bufsize = 1024;
	private int cmdsendtimeoutsecond=5;
	private int cmdtimeoutsecond = 7;
	private int connwaitsecond = 6;
	private int sessionidlesecond = 120;
	private int totaldealernum = 2; 
	private String charsetname = "UTF-8";	

	public int getBufsize() {
		return bufsize;
	}

	public void setBufsize(int bufsize) {
		this.bufsize = bufsize;
	}

	public int getCmdsendtimeoutsecond() {
		return cmdsendtimeoutsecond;
	}

	public void setCmdsendtimeoutsecond(int cmdsendtimeoutsecond) {
		this.cmdsendtimeoutsecond = cmdsendtimeoutsecond;
	}

	public int getCmdtimeoutsecond() {
		return cmdtimeoutsecond;
	}

	public void setCmdtimeoutsecond(int cmdtimeoutsecond) {
		this.cmdtimeoutsecond = cmdtimeoutsecond;
	}

	public int getConnwaitsecond() {
		return connwaitsecond;
	}

	public void setConnwaitsecond(int connwaitsecond) {
		this.connwaitsecond = connwaitsecond;
	}

	public int getSessionidlesecond() {
		return sessionidlesecond;
	}

	public void setSessionidlesecond(int sessionidlesecond) {
		this.sessionidlesecond = sessionidlesecond;
	}

	public String getCharsetname() {
		return charsetname;
	}

	public void setCharsetname(String charsetname) {
		this.charsetname = charsetname;
	}

	public int getTotaldealernum() {
		return totaldealernum;
	}

	public void setTotaldealernum(int totaldealernum) {
		this.totaldealernum = totaldealernum;
	}

	public RawTransferCommProps clone(){
		RawTransferCommProps p = new RawTransferCommProps();
		p.setBufsize(bufsize);
		p.setCmdsendtimeoutsecond(cmdsendtimeoutsecond);
		p.setConnwaitsecond(connwaitsecond);
		p.setCmdsendtimeoutsecond(cmdsendtimeoutsecond);
		p.setSessionidlesecond(sessionidlesecond);
		p.setCharsetname(charsetname);
		return p;
	}
}
